import request from '@/utils/request'

// 用户积分统计
export function getUserTotal(query) {
  return request({
    url: '/admin/user/total',
    method: 'get',
    params: query
  })
}
// 用户列表
export function getUserPage(query) {
  return request({
    url: '/admin/user/list',
    method: 'get',
    params: query
  })
}

// 用户详情
export function getUserInfo(id) {
  return request({
    url: '/admin/user/' + id,
    method: 'get'
  })
}

// 商家用户详情
export function getShopUserInfo() {
  return request({
    url: '/admin/user/getShopUserInfo',
    method: 'get'
  })
}

// 充值余额
export function updateUserAmount(data) {
  return request({
    url: '/admin/user',
    method: 'put',
    data: data
  })
}

//账单
export function getUserBillPage(query) {
  return request({
    url: '/admin/user/userBill/list',
    method: 'get',
    params: query
  })
}
//更新用户信息
export function updateUserInfo(data) {
  return request({
    url: '/admin/user',
    method: 'post',
    data: data
  })
}
//删除用户
export function remove(id) {
  return request({
    url: '/admin/user/' + id,
    method: 'delete',
  })
}

export function changeUserStatus(userId, status) {
  const data = {
    userId,
    status
  }
  return request({
    url: '/admin/user/changeStatus',
    method: 'put',
    data: data
  })
}

// 导出用户
export function exportUser(query) {
  return request({
    url: '/admin/user/export',
    method: 'get',
    params: query
  })
}

// 用户银行卡列表
export function getUserBank(query) {
  return request({
    url: '/admin/user/userBank/list',
    method: 'get',
    params: query
  })
}

//用户提现列表
export function userWithdrawlist(data) {
  return request({
    url: '/admin/user/userWithdraw/list',
    method: 'post',
    data: data
  })
}

//提现列表
export function getUserWithdrawPage(query) {
  return request({
    url: '/admin/user/userWithdraw/list',
    method: 'get',
    params: query
  })
}
//提现审核
export function auditUserWithdraw(data) {
  return request({
    url: '/admin/user/userWithdraw/audit',
    method: 'put',
    data: data
  })
}

//提现审核
export function saveUserExchange(data) {
  return request({
    url: '/admin/user/amtExchange',
    method: 'post',
    data: data
  })
}

//实名认证列表
export function listUserIdentifyAuth(query) {
  return request({
    url: '/admin/user/userIdentifyAuth/list',
    method: 'get',
    params: query
  })
}
//提现审核
export function userIdentifyAuth(data) {
  return request({
    url: '/admin/user/userIdentifyAuth',
    method: 'put',
    data: data
  })
}

// 删除视频管理
export function closeAccount(userId) {
  return request({
    url: '/admin/user/closeAccount/' + userId,
    method: 'put',
  })
}

// 积分充值
export function updateUserAmt(data) {
  return request({
    url: "/admin/user/updateUserAmt",
    method: "put",
    data: data,
  });
}

// 禁用视频用户
export function forbiddenUser(data) {
  return request({
    url: '/admin/user/userForbidden',
    method: 'put',
    data: data
  })
}

// 解冻用户账号
export function unForbiddenUser(userId) {
  return request({
    url: '/admin/user/userUnForbidden/' + userId,
    method: 'put'
  })
}
// 禁用视频用户
export function updateUserRegisterCode(data) {
  return request({
    url: '/admin/user/updateUserRegisterCode',
    method: 'put',
    data: data
  })
}




//提现列表
export function creativeorderlist(query) {
  return request({
    url: '/admin/creative/order/list',
    method: 'get',
    params: query
  })
}

export function powerServerorderlist(query) {
  return request({
    url: '/admin/powerServer/order/list',
    method: 'get',
    params: query
  })
}



export function userBilllist(query) {
  return request({
    url: '/admin/user/userBill/list',
    method: 'get',
    params: query
  })
}
export function listUserTeam(query) {
  return request({
    url: '/admin/user/listUserTeam',
    method: 'get',
    params: query
  })
}

export function userWithdrawlists(query) {
  return request({
    url: '/admin/user/userWithdraw/list',
    method: 'get',
    params: query
  })
}








